package com.ddyx.rest.user;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ddyx.mapper.user.UStoreMapper;
import com.ddyx.service.user.UStoreService;
import com.ddyx.util.RequestForm;
import com.ddyx.util.ResponseForm;

@Controller
@RequestMapping("/ustore")
public class UStoreController {
	
	@Resource
	UStoreService uStoreService;
	
	/**
	 * 添加店铺
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "addStore",method =RequestMethod.POST)
	public ResponseForm addStore (@RequestBody RequestForm param) {
		return uStoreService.addStore(param);
	}
	
	
	/**
	 * 修改店铺信息
	 * @param param
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value="editStore",method = RequestMethod.POST)
	public ResponseForm editStore(@RequestBody RequestForm param) {
		return uStoreService.editStore(param);
	}
	
	/**
	 * 管理员获取门店列表
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value="getStoreList")
	public ResponseForm getStoreList(@RequestBody RequestForm param) {
		return uStoreService.getStoreList(param);
	}
	
	
	/**
	 * 获取门店列表
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value="storeList")
	public ResponseForm storeList(@RequestBody RequestForm param) {
		return uStoreService.storeList(param);
	}
	
	/**
	 * 通过storeNo获取店铺信息
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value="getStoreInfo")
	public ResponseForm getStoreInfo(@RequestBody RequestForm param) {
		return uStoreService.getStoreInfo(param);
	}
	
}
